package com.oig.base.api;

import com.oig.base.api.factory.UnitConvRateFallBackFactory;
import com.oig.sys.base.vo.UnitConvRateVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(contextId="unitConvRateService", value="sys-base-server",path="/unitCR", fallbackFactory=UnitConvRateFallBackFactory.class)
public interface UnitConvRateService {

    /**
     * 单位换算率
     * @param unitCode 原单位
     * @param targetUnitCode 目标单位
     * @return 换算率
     */
    @GetMapping(value = "/getUnitConvRate")
    UnitConvRateVo getUnitConvRate(@RequestParam("unitCode")String unitCode, @RequestParam("targetUnitCode")String targetUnitCode);

}
